{% extends 'base.html' %}
{% load static %}

{% block css %}
    <link href="{% static 'pluigns/bootstrap-datepicke/css/bootstrap-datepicker.css' %}">
{% endblock %}

{% block content %}
    <div class="container">
     <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">新建用户</h3>
          </div>
      <div class="panel-body">
                 {#     novalidate取消网页默认的提示           #}
         <form class="form-horizontal" method="post" novalidate style="margin: 10px 10px">
              {% csrf_token %}
             {% for item in form %}
             <div class="form-group">
                  <label>{{ item.label }}:</label>
                       {{ item }}
                    <span style="color:red;">{{ item.errors.0 }}</span>
              </div>
             {% endfor %}
              <button type="submit" class="btn btn-primary">提 交</button>
          </form>
      </div>
     </div>
    </div>
{% endblock %}

{% block js %}
    <script src="{% static 'pluigns/bootstrap-datepicke/js/bootstrap-datepicker.js' %}"></script>
    <script src="{% static 'pluigns/bootstrap-datepicke/locales/bootstrap-datepicker.zh-CN.min.js' %}"></script>
    <script>
        $(function (){
            $('#id_create_time').datepicker({
                format: 'yyyy-mm-dd',
                startDate: '0',
                language:'zh-CN',
                autoclose: true
            });
        });
    </script>
{% endblock %}